This invention relates to the fields of computer systems and networking. More particularly, a system and methods are provided for executing a set of computer-readable instructions in response to a network resource request.
The Domain Name Service (DNS) system is a network name service that is used to assist a computer system, such as a client, in locating or connecting to another network entity. For example, a DNS server receives requests from client systems that wish to connect to a server offering a desired application or service--such as electronic mail or Internet browsing--but which do not know how to reach the server (e.g., its location on the network). The client therefore queries the DNS server, which provides a suitable response depending on the type of information the client requests (e.g., a network address of the desired server).
Multiple servers may be configured to offer an application or replicated service (e.g., a service offered simultaneously on each of multiple servers), in which case the client may be directed to any of the multiple servers in order to satisfy the client's request. In addition, the multiple servers may be situated in various locations and/or serve different clients. Therefore, in order to make effective use of the application or replicated service, a method is needed to distribute clients' requests among the servers and/or among the instances of the application or service. This process is often known as load balancing.
DNS servers can be configured to provide load balancing in addition to their traditional roles (e.g., resolving requests for information concerning a network entity). Methods of using a DNS server for load balancing among instances of a replicated service have been developed, but are unsatisfactory for various reasons.
In one method of load balancing a replicated service, a DNS server directs or assigns requests to the servers offering the service on a round-robin basis. In other words, client requests are routed to the servers in a rotational order. Each instance of the replicated service may thus receive substantially the same number of requests as the other instances. Unfortunately, this scheme can be very inefficient. Because the servers that offer a replicated service may be geographically distributed, a client's request may be routed to a relatively distant server, thus increasing the transmission time and cost incurred in submitting the request and receiving a response. In addition, the processing power of the servers may vary widely. One server may, for example, be capable of handling a larger number of requests or be able to process requests faster than another server. As a result, a more powerful server may periodically be idle while a slower server is over-burdened.
In another method of load balancing, specialized hardware is employed in addition to a DNS server to store information concerning the servers offering a replicated service. In particular, this method stores information concerning the servers' burdens (e.g., number of client requests), on a computer system other than the DNS server. Based on that information a user's request is routed to the least-loaded server. In a web-browsing environment, for example, when a user's service access request (e.g., a connection request to a particular Uniform Resource Locator (URL) or virtual server name) is received by a DNS server, the DNS server queries or passes the request to the specialized hardware. Based on the stored information, the user's request is then forwarded to the least-loaded server offering the requested service. This method is also inefficient because it delays and adds a level of complexity to satisfying access requests. Requiring the DNS server to query or access another server in order to resolve the request is inefficient and delays satisfaction of the request.
In yet other methods of balancing requests among multiple instances of a replicated service, client requests are randomly assigned to one of the multiple host servers or are assigned to the closest server. Random assignment of client requests suffers the same disadvantages as a round-robin scheme, often causing requests to be routed to geographically distant servers and/or servers that are more burdened than others. This naturally results in unnecessary delay. Simply assigning requests to the closest server may also be inefficient because a faster response may be available from a server that, although further from the client, has less of a load.
As mentioned above, present load balancing techniques are also limited in scope. For example, the techniques described above are typically designed for replicated services only and, in addition, only consider the operational status or characteristics of the servers hosting the replicated service, not the service itself. In other words, present techniques do not allow load balancing among instances of application programs other than replicated services or, more generally, the collection or consideration of information concerning the status of individual instances of applications or services executing on multiple servers.
In its traditional role as a name server, a DNS server may also be configured to return certain, limited, information other than a network address of a desired server. Such information may include, for example, the name of a machine or entity responsible for a particular server or service, the name of a DNS server providing name services for a particular portion (e.g., domain) of a network, a network address corresponding to an alias for a domain name, etc.
The information that is returned by a DNS server is inflexible, however, in that it is hard-coded into resource records that are automatically returned in response to a client's request. Each record can only return the type of information for which it is configured; therefore, the type of information that is returned depends entirely upon what is requested. The content of a resource record may be modified, but doing so entails a large amount of effort for most networks and cannot be done quickly. For example, making modifications to resource records may require updating the DNS database on a primary server as well as propagating the update(s) to secondary DNS servers.
A type of resource record that, when invoked, allows some action to be taken (other than simply returning a piece of information to the client) is unknown. Such a resource record would greatly enhance the functionality and flexibility of a network name service such as DNS.